Arrange Data Hierarchically

{ getHierarchicalData }

Arrange the values from given drop zones in a hierarchical structure. This is used for creating hierarchical visuals, like tree maps, circle packing charts, and sunbursts.

Method
getHierarchicalData(
chunkData: number[][],
dropZones: DropZoneType[],
maxItems: number = Number.MAX_VALUE,
valueDropZone: DropZoneType = DropZoneType.Values
): d3Hierarchy.HierarchyNode<{ caption?: string }>

Arguments

chunkData: number [][]

  • The whole chunk data.

dropZones: DropZoneType[]

  • The dropZoneType by which to group the chunk data.

maxItems: number

  • Limit the hierarchical structure to maximum number of items.
  • Optional. Defaults to Number.MAX_VALUE.

valueDropZone: DropZoneType

  • Set the dropZoneType from which to take the hierarchy leaf values.
  • Optional.

Returns

d3.HieracrchyNode

  • The hierarchical object.